window.onload = function () {   
        var aTabs = document.getElementById("tabs").getElementsByTagName("li");
        var aList = document.getElementById("lists").getElementsByTagName("ul");
        var oKeyw = document.getElementById("keyw");
        var oKeydis = document.getElementById("keydis");
        
        
        var aDom = document.getElementById("dom").getElementsByTagName("li");
        var oDom = document.getElementById("domblock");
        var aDot = document.getElementById("domblock").getElementsByTagName("ul");
        
        function SlyarErrors() {
 
            return true;
             
            }
             
            window.onerror = SlyarErrors;


        for (var i in aTabs) {
            aTabs[i].onclick = showlist;
        }

        function showlist() {
        for (var i in aTabs) {
            if (aTabs[i] === this){
            aTabs[i].className="active";
            aList[i].className="over-flow  active";
            }else
            {
            aTabs[i].className="";  
            aList[i].className="over-flow";
            }
        }
        }
        
        var oSkn = document.getElementById("seckillNav");
        
        window.onscroll = function () {
            var scroliTop = document.documentElement.scrollTop;
            
            if (scroliTop >= 260){
            oSkn.className = "w seckill-nav seckill-navfixed";
            }else
            {
            oSkn.className = "w seckill-nav";
            }
        }

        
        oKeyw.onclick = function(ev){
            oKeydis.style.display="none";
             var oEvent=ev||event;     //兼容火狐，ie,谷歌
             oEvent.cancelBubble=true; //取消事件冒泡
        }

        document.onclick = function(ev){
            oKeydis.style.display="block";
            
            
            

        }
        
        
        for (var i in aDom) {
          
        if (i==0 || i>7){
            continue;  
        }
            
            aDom[i].onmouseover= showli;    
            aDom[i].onmouseout = showout;
         
    }
    
    






    // overstr
      
      for (var i in aDot) {
        var arr = [aDot[0],aDot[1],aDot[2],aDot[3],aDot[4],aDot[5],aDot[6]];
           arr.unshift(0);
        
      }
      console.log(arr);
    

   
      oDom.onmouseover=function () {
        clearTimeout(timer);
        oDom.style.height="229px";
        oDom.style.borderTop="1px solid #e0e0e0";

        console.log(oDom.style.height);
    }
    oDom.onmouseout=function () {

       timer=setTimeout(function(){
        oDom.style.height="0px";
        oDom.style.borderTop="0px solid #e0e0e0";
    },400);
        console.log(oDom.style.height);
    }





        function showli () {
            clearTimeout(timer);
            
            for (var i in aDom) {
                if (aDom[i] === this ){
               
                arr[i].className="children-list over-flow"; //当前ul
                oDom.style.height="229px"; //展开高
                
                oDom.style.borderTop="1px solid #e0e0e0"; //top 线条
                
                console.log(arr[i],oDom.style.height,"我指向了");
                
                }else
                {
                
                arr[i].className="over-flow";
                
              
                }
              
        }
        
       
    }
    //  outstr 
    var  timer=null;

    function showout () {
        timer=setTimeout(function(){
        
        for (var i in aDom) {
            
            if (aDom[i] === this ){
        
            arr[i].className="over-flow";   
        
            
            }else
            {
                
            
                arr[i].className="children-list over-flow";
                oDom.style.height="0px";
                oDom.style.borderTop="0px solid #e0e0e0";
                oDom.style.transition=".4s";
                
                console.log(arr[i],oDom.style.height,"我指向了");
          
            }
        
          
    }},300);
    
      
}

var oDown = document.getElementById("downapp");
var oBox = document.getElementById("box");
var Tm=null;

console.log(oBox);
oDown.onmouseover  = oBox.onmouseover =    function() {
    clearTimeout(Tm);
    oBox.style.display='block';
    oDown.style.color='#fff';
    
    

};
oDown.onmouseout =  oBox.onmouseout = function(){

   Tm=setTimeout(function(){
       oBox.style.display='none';
       oDown.style.color='#b0b0b0';
    },100);
}



//  outend   
}
